package com.tanjie.blackbean.system.admin.model.role;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

/**
 * 角色表
 *
 * @author tanjie
 * @since 2022-04-20
 */
@Getter
@Setter
@ToString
@TableName("sys_role")
@Schema(name = "RolePO", description = "角色表")
public class RolePO implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键id")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @Schema(description = "角色名称")
    @TableField("`name`")
    private String name;

    @Schema(description = "角色编码")
    @TableField("`code`")
    private String code;

    @Schema(description = "组织机构（部门）id")
    @TableField("org_id")
    private String orgId;

    @Schema(description = "是否为公共角色")
    @TableField("is_public")
    private Boolean isPublic;

    @Schema(description = "显示顺序")
    @TableField("sort")
    private Integer sort;

    @Schema(description = "更新时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @Schema(description = "创建时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @Schema(description = "创建人")
    @TableField(value = "create_by", fill = FieldFill.INSERT)
    private String createBy;

    @Schema(description = "修改人")
    @TableField(value = "update_by", fill = FieldFill.UPDATE)
    private String updateBy;


}
